package com.xccwk.mybatisservlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.xccwk.model.User;
import com.xccwk.serviceImp.MybatisMapperServiceImp;

@WebServlet("/mybatVuage")
public class MybatisSelectVuageServlet extends HttpServlet {
	MybatisMapperServiceImp imp=new MybatisMapperServiceImp();
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		List<User> listUser;
		String like= req.getParameter("like");
		System.out.println(like);
		listUser=imp.avageSelect(like);
		//System.out.println(listUser.toString());
		req.getSession().setAttribute("listUser",listUser);
		resp.sendRedirect("login.jsp");
		
	}

	
	
	
}
